import Cookies from 'js-cookie'

export function setToken(token) {
  Cookies.set('Token', token)
}

export function getToken() {
  return Cookies.get('Token')
}

export function removeToken() {
  Cookies.remove('Token')
}

export function timeFix() {
  const time = new Date()
  const hour = time.getHours()
  return hour < 9 ? '早上好' : (hour <= 11 ? '上午好' : (hour <= 13 ? '中午好' : (hour < 20 ? '下午好' : '晚上好')))
}
